Skip to content

Feature/experimental#593

Draft
leopiccionia wants to merge 291 commits into
developfrom
feature/experimental
Draft

Feature/experimental#593
leopiccionia wants to merge 291 commits into
developfrom
feature/experimental

Conversation

@leopiccionia

Copy link
Copy Markdown
Collaborator

No description provided.

hacklab-dgs and others added 30 commits April 1, 2026 01:29
…ker limits

- Correctly set system instructions in Neuron_Agent to prevent LLMs (Gemini) from bypassing strict georeferencing rules.
- Add [SKIP_ENFORCED_SCHEMA] bypass to internal AI tools (Prompt Generator, API Tester) to prevent OpenAI from returning empty arrays.
- Configure generous Docker limits (PHP memory, uploads, max_execution_time, Apache timeout, and MariaDB max_allowed_packet) for heavy development tasks.
- Document stability mandates and Docker configurations in GEMINI.md.
- Added a 'Big Numbers' summary section at the top of the AI Logs page to display total input/output tokens and request count grouped by provider and model.
- Refactored the provider column in the logs table to distinctly separate the Provider Name (e.g., 'OPENAI') and the Model ID (e.g., 'gpt-4o') for improved readability.
…Base

- Integrated Neuron AI's FileVectorStore with separated production and test environments.
- Added WP-CLI command (`wp jeo ai vectorize`) to bulk ingest published posts.
- Created interactive RAG Dashboard in Settings with a visual Embedding Model selector (Select2).
- Enabled Semantic Retrieval tests and random post Vectorization tests directly from the WordPress admin.
- Implemented mathematical token approximation for embedding operations (Ingestion & Retrieval) tracking costs in AI Dashboard.
- Updated architectural documentation (GEMINI.md) and README files highlighting v3.8.0 features.
- Updated `JEO_VERSION` constant and plugin header in `src/jeo.php`.

- Updated package version in `package.json` and synced `package-lock.json`.

- Updated build version target in `build.sh`.

- Aligned versioning across all documentation (README.md, README_BR.md, rag-integration.md, src/README.txt, trunk/readme.txt, and GEMINI.md), replacing future 3.8.0 mentions with the current experimental build version.
- Implemented RAG_Agent::is_feasible() to validate directory permissions and AI provider compatibility.

- Added a visual overlay in Settings > Knowledge Base to block RAG features when requirements are not met, providing friendly guidance for troubleshooting.
- Dynamically generates an .htaccess file in the jeo-ai-store upload directory to deny public web access.

- Strictly adheres to the security mandates defined in GEMINI.md.
…lization with background processing and audit logs
… AI review and standardize structured geodata schema
…mic dual-state UI (masked text/password edit)
hacklab-dgs and others added 30 commits June 19, 2026 22:22
- Persist technical summary per conversation in post_meta
  (_jeo_minimap_summary_{conversation_id}): original intent, topics,
  layers found/removed, base variant, center/zoom, pins count.
- Enrich build_state_context with per-layer reasons, full pin coordinates,
  original intent and searched topics.
- Strengthen system prompt with explicit Refinement Rules:
  preserve existing map, make only requested changes, minimal regeneration.
- Improve post_analyzer queries with thematic query templates.
- Add diff guard in run_agent(): preserves previous layers when the agent
  removes too many without an explicit regeneration request, and warns the
  user in the result message.
- validate_layers() now returns valid + removed IDs; removed_layers is
  included in REST responses and surfaced as a notice message.
- Strengthen system prompt to reject generic national layers for
  local/regional scopes.
- Deduplicate manually added layer IDs in layers-settings.js.
- Use ai_rag_topk setting (default 10, clamp 1-50) in minimap setup and
  Search_Layers_Tool.
- Implement hybrid layer search: semantic RAG + WP_Query text search in
  RAG_Worker.
- Add optional per-layer reason field in Minimap_Output schema, prompt,
  and layers-panel UI.
- Improve post_analyzer suggested_search_queries with thematic templates.
- Add orderBy attribute with modes: recent, nearest, relevance.
- Add combined distance + date scoring formula for relevance mode.
- Add maxAgeDays filter (0 = no limit) with SQL DATE_SUB clause.
- Expose distanceWeight and dateWeight controls when relevance is selected.
- Wire new attributes through JS block registration, editor controls,
  frontend REST params and REST schema/sanitization.
…boundaries and explain mode

- Register layer-theme taxonomy for map-layer with default terms.
- Include themes in RAG embeddings and search results.
- Expose available layer themes in the minimap system prompt.
- Allow proactive generation of simple administrative boundary layers
  (municipal/state) without explicit user confirmation when Mapbox key exists.
- Enrich agent layer output with attribution and theme metadata.
- Display layer reason, themes and source in the inspector layers-panel.
Document Phase 3 refinement stability (summary persistence, state context,
diff guard), Phase 4 layer themes/explain mode, and Stories Near You
ordering/scoring/age filter features.
…ental

- Phase 3: refinement stability (summary persistence, enriched state context,
  diff guard, refinement rules in prompt).
- Phase 4.1-4.3: layer-theme taxonomy, RAG theme indexing, proactive admin
  boundaries, explain mode in layers panel.
- Phase 4.4-4.6: stories-near-you orderBy, combined distance+date scoring,
  maxAgeDays filter, distance/date weights.
- Keep radiusKm attribute and validate_layers_report() naming from the
  correct Phase 1-2 base branch.
- Add AsyncModeProvider wrappers to layer-editor and map-editor previews.
- Update .architecture/ docs.
- Split sidebar and block responsibilities: sidebars hold forms only,
  live previews live in jeo/layer-editor and jeo/map-editor blocks.
- Remove key-based remounts in layer-editor-preview and map-editor-preview.
- Add load_as_style support via map-blocks/use-style-layer.js across all
  map editors (minimap, map, onetime-map, storymap).
- Add save-lock and notices in layer-editor-preview based on load status.
- Use local viewState in map-editor-preview; persist center/zoom only on
  moveend/zoomend.
- Simplify layers-sidebar.js and maps-sidebar.js; remove dead portals and
  scss files.
- Update .architecture docs and AGENTS.md conventions.
…liana/Thayane)

Mini-Mapas:
- Render visible fallback paint for vector layers with no saved style so
  AI-selected catalog layers stop appearing invisibly (only pins showing).
- Validate layer renderability (not just published status); report layers
  missing required source config as removed instead of rendering empty.
- Flag auto-styled layers in the layers panel; reinforce boundary+theme prompt.
- Widen RAG layer recall with PT/EN domain synonyms in the embedding text.

Histórias Perto de Mim:
- Default ordering changed from "recent" to "relevance" (distance + date).
- Discard invalid/sentinel coordinates in the proximity SQL.
- Register the index meta key that is actually written (_geocode_lon_*).
- Enqueue frontend assets from render_callback so the block loads even when
  has_block() misses it; enqueue core/latest-posts styles for native layout
  and fix featured image sizing.

Contexto por IA:
- Reinforce anti-hallucination rules (no invented terms, cite exact source).
- Display the references used (were fetched but never rendered).
- Archive suggestion versions and add a "Previous suggestions" browser in the
  expanded view; persist refined responses; clean up metas on uninstall.
…/experimental

# Conflicts:
#	.architecture/minimap/README.md
#	.architecture/stories-near-you/README.md
#	AGENTS.md
#	src/includes/ai/class-layer-data-loader.php
#	src/includes/ai/class-minimap-agent.php
#	src/includes/ai/class-minimap-output.php
#	src/includes/ai/class-search-layers-tool.php
#	src/includes/minimap/class-minimap.php
#	src/includes/stories-near-you/class-stories-near-you.php
#	src/js/src/layers-sidebar/layers-sidebar.js
#	src/js/src/map-blocks/index.js
#	src/js/src/map-blocks/layers-panel.css
#	src/js/src/map-blocks/layers-panel.js
#	src/js/src/map-blocks/layers-settings.js
#	src/js/src/map-blocks/stories-near-you-editor.js
Consolidate duplicated logic from build.sh, install-and-build.sh and
build-wordpress-zip.sh into a shared scripts/lib/common.sh (logging
helpers, plugin-version extraction, Node 24 check with nvm fallback,
ZIP packaging).

- build.sh is now the canonical release builder (absorbs the superior
  vendor cleanup / i18n / output validation from build-wordpress-zip.sh)
- install-and-build.sh does a clean reinstall then delegates build+zip
  to build.sh --skip-composer
- build-wordpress-zip.sh becomes a thin alias that execs build.sh
- jeo_ensure_node_24 sources nvm first and switches to Node 24 before
  any npm step, so the build never hits EBADDEVENGINES
- recreate the missing scripts/check-node-version.mjs (its absence made
  install-and-build.sh error on every run)
- document the consolidated scripts in .architecture/build/README.md
Add jeo_ensure_php_extensions to the shared lib and call it in build.sh
before the production composer install. Verifies dom/xml/zip/mbstring
(phpoffice/phpword needs ext-dom) and fails early with an actionable
apt + phpenmod hint instead of letting composer error cryptically with
"requires ext-dom -> missing from your system".
The new `@wordpress/blocks` dependency, `marked`, is ESM-only.
It was added to Jest transformIgnorePatterns.
… assistant

- Minimap: layer excerpts/attribution/themes in panel and search; per-layer
  opacity slider applied to editor preview and frontend renderers; search
  result disambiguation.
- Stories Near You: default orderBy to 'recent' and maxAgeDays to 365; remove
  dead radiusKm param; fully parameterize get_nearby_posts SQL.
- Context Assistant: post-generation link validation against references;
  stricter prompt rules against reference blending and reused corrected terms.
- Docs: update .architecture READMEs and AGENTS.md with new behaviors.
- QA: add manual test plan (markdown + PDF).
…sparadas

- Corrige .docker/docker-compose.yml que montava ../vendor sobre src/vendor,
  quebrando o autoloader de produção (NeuronAI\RAG\RAG não encontrado) e
  causando erro fatal 500 no endpoint /jeo/v1/minimap/setup.
- Adiciona fallback manual para generateUUID() em contextos não seguros onde
  crypto.randomUUID() não está disponível.
- Envolve chamadas apiFetch do minimap em try/catch para capturar falhas
  síncronas e evitar spinner eterno.
- Verifica postId antes de setar status=loading nas gerações por conteúdo e
  por prompt, exibindo mensagem amigável se o post ainda não foi salvo.
- Corrige ordem dos parâmetros em $wpdb->prepare de get_nearby_posts(), que
  deslocava lat/lng/radius/post_type e provocava memory exhaustion.
- Inclui resumo executivo, contexto do feedback e correções por pilar.
- Detalha a regressão crítica do Mini-Mapa e sua causa raiz.
- Lista quality gates executados e instruções de aplicação no ambiente.
- Gera PDF com cabeçalho Hacklab/ e footer NDA.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants